var app = getApp();
Page({
  data: {
    url: {
      getTotalCount: app.url.baseUrl + "/my/totalCount"
    },
    userInfo: {},
    total: [0, 0, 0],
    areaSelectedStr: ''
  },
  onLoad: function () {
    console.log(11);
    var userInfo = app.getStorage(app.keys.USER_INFO);
    this.setData({ userInfo: userInfo })
    console.log("用户信息开始")
    console.log(userInfo)
    console.log("用户信息结束")
  },
  onShow: function () {
    this.getTotalCount()
  },
  getTotalCount: function () {
    var that = this;
    app.ajax(this.data.url.getTotalCount, null, function (res) {
      var data = res.data.data;
      for (var i = 0; i < data.length; i++) {
        if (data[i] == null)
          data[i] == 0
      }
      that.setData({ total: data })
    })
  },
  //拨打电话
  callPhone: function () {
    wx.makePhoneCall({
      phoneNumber: "4000880231"
    })
  },
})

